
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `name` varchar(50) DEFAULT '' COMMENT '字典名称',
  `code` varchar(50) DEFAULT '' COMMENT '字典编码',
  `status` tinyint(1) DEFAULT '0' COMMENT '状态（0-正常 ,1-停用）',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modified_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `type_code` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典类型表';

-- ----------------------------
-- Records of sys_dict
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict` VALUES (1, '授权方式', 'grant_type', 1, NULL, '2020-10-17 08:09:50', '2021-01-31 09:48:24');
INSERT INTO `sys_dict` VALUES (2, '微服务列表', 'micro_service', 1, NULL, '2021-06-17 00:13:43', '2021-06-17 00:17:22');
INSERT INTO `sys_dict` VALUES (3, '请求方式', 'request_method', 1, NULL, '2021-06-17 00:18:07', '2022-01-22 09:24:59');
COMMIT;

-- ----------------------------
-- Table structure for sys_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_item`;
CREATE TABLE `sys_dict_item` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) DEFAULT '' COMMENT '字典项名称',
  `value` varchar(50) DEFAULT '' COMMENT '字典项值',
  `dict_code` varchar(50) DEFAULT '' COMMENT '字典编码',
  `sort` int(11) DEFAULT '0' COMMENT '排序',
  `status` tinyint(1) DEFAULT '0' COMMENT '状态（0 停用 1正常）',
  `defaulted` tinyint(1) DEFAULT '0' COMMENT '是否默认（0否 1是）',
  `remark` varchar(255) DEFAULT '' COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modified_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典数据表';

-- ----------------------------
-- Records of sys_dict_item
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict_item` VALUES (1, '密码模式', 'password', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:11:52', '2021-01-31 09:48:18');
INSERT INTO `sys_dict_item` VALUES (2, '授权码模式', 'authorization_code', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:15', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (3, '客户端模式', 'client_credentials', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:36', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (4, '刷新模式', 'refresh_token', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:12:57', '2021-01-08 17:33:12');
INSERT INTO `sys_dict_item` VALUES (5, '简化模式', 'implicit', 'grant_type', 1, 1, 0, NULL, '2020-10-17 09:13:23', '2020-12-14 10:11:00');
INSERT INTO `sys_dict_item` VALUES (6, '系统服务', 'uum-admin', 'micro_service', 1, 1, 0, NULL, '2021-06-17 00:14:12', '2021-06-17 00:14:12');
INSERT INTO `sys_dict_item` VALUES (7, '不限', '*', 'request_method', 1, 1, 0, NULL, '2021-06-17 00:18:34', '2021-06-17 00:18:34');
INSERT INTO `sys_dict_item` VALUES (8, 'GET', 'GET', 'request_method', 2, 1, 0, NULL, '2021-06-17 00:18:55', '2021-06-17 00:18:55');
INSERT INTO `sys_dict_item` VALUES (9, 'POST', 'POST', 'request_method', 3, 1, 0, NULL, '2021-06-17 00:19:06', '2021-06-17 00:19:06');
INSERT INTO `sys_dict_item` VALUES (10, 'PUT', 'PUT', 'request_method', 4, 1, 0, NULL, '2021-06-17 00:19:17', '2021-06-17 00:19:17');
INSERT INTO `sys_dict_item` VALUES (11, 'DELETE', 'DELETE', 'request_method', 5, 1, 0, NULL, '2021-06-17 00:19:30', '2021-06-17 00:19:30');
INSERT INTO `sys_dict_item` VALUES (27, '博文服务', 'uum-blog', 'micro_service', 1, 0, 0, '', '2022-02-03 22:35:58', NULL);
INSERT INTO `sys_dict_item` VALUES (28, '图片服务', 'uum-oss', 'micro_service', 2, 0, 0, '', '2022-02-05 12:00:35', NULL);
INSERT INTO `sys_dict_item` VALUES (29, '消息服务', 'uum-mq', 'micro_service', 3, 0, 0, '消息推送等', '2022-03-03 15:01:08', NULL);
INSERT INTO `sys_dict_item` VALUES (30, '验证服务', 'uum-auth', 'micro_service', 0, 0, 0, '', '2022-03-07 18:08:26', NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_login_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_login_log`;
CREATE TABLE `sys_login_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(255) DEFAULT NULL COMMENT '用户ID',
  `login_time` datetime DEFAULT NULL COMMENT '登入時間',
  `location` varchar(255) DEFAULT NULL COMMENT '登录地点',
  `ip` varchar(50) DEFAULT NULL COMMENT 'ip地址',
  `user_system` varchar(50) DEFAULT NULL COMMENT '用戶操作系統',
  `user_browser` varchar(50) DEFAULT NULL COMMENT '浏览器',
  `client` varchar(10) DEFAULT NULL COMMENT '客户端',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=360 DEFAULT CHARSET=utf8mb4;


-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `menu_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `parent_id` bigint(20) DEFAULT NULL COMMENT '父级菜单ID，一级菜单为0',
  `name` varchar(20) DEFAULT NULL COMMENT '菜单名字',
  `url` varchar(200) DEFAULT NULL COMMENT '菜单URL',
  `type` int(11) DEFAULT NULL COMMENT '类型   0：目录   1：菜单   2：按钮',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `icon` varchar(20) DEFAULT NULL COMMENT '菜单图标',
  `permission` varchar(255) DEFAULT NULL COMMENT '授权(多个用逗号分隔，如：user:list,user:create)',
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10103 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES (1, 0, '博文管理', '', 0, 0, '博文管理 2', '');
INSERT INTO `sys_menu` VALUES (2, 1, '博文列表', '/blog/blog', 1, 0, '博文管理4', NULL);
INSERT INTO `sys_menu` VALUES (4, 0, '标签分类管理', '', 0, 1, '标签', NULL);
INSERT INTO `sys_menu` VALUES (5, 4, '分类列表', '/tag-category/category', 1, 0, '分类', NULL);
INSERT INTO `sys_menu` VALUES (7, 4, '标签列表', '/tag-category/tag', 1, 0, '标签1', NULL);
INSERT INTO `sys_menu` VALUES (14, 21, '用户管理', '/system/user/index', 1, 0, '用户管理 (1)', NULL);
INSERT INTO `sys_menu` VALUES (19, 21, 'OSS图片管理', '/picture/OssPicture', 1, 1, '图片管理', NULL);
INSERT INTO `sys_menu` VALUES (21, 0, '系统管理', '', 0, 5, '系统管理2', NULL);
INSERT INTO `sys_menu` VALUES (23, 1, '博文编辑', '/blog/blog-add-or-update', 1, 1, '发表博文', NULL);
INSERT INTO `sys_menu` VALUES (149, 0, '日志管理', '', 0, 4, '日志管理1', NULL);
INSERT INTO `sys_menu` VALUES (150, 149, '登录日志', '/log/login', 1, 0, '登陆日志', NULL);
INSERT INTO `sys_menu` VALUES (10009, 21, '角色管理', '/system/role/index', 1, 0, '角色管理', '');
INSERT INTO `sys_menu` VALUES (10068, 149, '操作日志', '/log/operation', 1, 2, '操作日志', '');
INSERT INTO `sys_menu` VALUES (10072, 0, '推送消息管理', '', 0, 2, '消息推送 (2)', '');
INSERT INTO `sys_menu` VALUES (10073, 10072, '消息列表', '/mq/index', 1, 0, '消息推送 (3)', '');
INSERT INTO `sys_menu` VALUES (10085, 21, '字典管理', '/system/dict', 1, 0, '字典管理 (1)', '');
INSERT INTO `sys_menu` VALUES (10086, 21, '客户端管理', '/system/client', 1, 0, '客户端管理', '');
INSERT INTO `sys_menu` VALUES (10087, 21, '菜单权限管理', '/system/menu/index', 1, 0, '权限', '');
INSERT INTO `sys_menu` VALUES (10102, 21, '图标管理', '/system/icons/index', 1, 0, '笑脸', '');
COMMIT;

-- ----------------------------
-- Table structure for sys_menu_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu_role`;
CREATE TABLE `sys_menu_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2579 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_menu_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu_role` VALUES (2471, 1, 1);
INSERT INTO `sys_menu_role` VALUES (2472, 1, 2);
INSERT INTO `sys_menu_role` VALUES (2473, 1, 23);
INSERT INTO `sys_menu_role` VALUES (2474, 1, 4);
INSERT INTO `sys_menu_role` VALUES (2475, 1, 5);
INSERT INTO `sys_menu_role` VALUES (2476, 1, 6);
INSERT INTO `sys_menu_role` VALUES (2477, 1, 7);
INSERT INTO `sys_menu_role` VALUES (2478, 1, 8);
INSERT INTO `sys_menu_role` VALUES (2479, 1, 9);
INSERT INTO `sys_menu_role` VALUES (2480, 1, 11);
INSERT INTO `sys_menu_role` VALUES (2481, 1, 12);
INSERT INTO `sys_menu_role` VALUES (2482, 1, 10072);
INSERT INTO `sys_menu_role` VALUES (2483, 1, 10073);
INSERT INTO `sys_menu_role` VALUES (2484, 1, 137);
INSERT INTO `sys_menu_role` VALUES (2485, 1, 138);
INSERT INTO `sys_menu_role` VALUES (2486, 1, 20);
INSERT INTO `sys_menu_role` VALUES (2487, 1, 17);
INSERT INTO `sys_menu_role` VALUES (2488, 1, 19);
INSERT INTO `sys_menu_role` VALUES (2489, 1, 144);
INSERT INTO `sys_menu_role` VALUES (2490, 1, 21);
INSERT INTO `sys_menu_role` VALUES (2491, 1, 14);
INSERT INTO `sys_menu_role` VALUES (2492, 1, 10009);
INSERT INTO `sys_menu_role` VALUES (2493, 1, 10085);
INSERT INTO `sys_menu_role` VALUES (2494, 1, 10086);
INSERT INTO `sys_menu_role` VALUES (2495, 1, 10087);
INSERT INTO `sys_menu_role` VALUES (2496, 1, 10102);
INSERT INTO `sys_menu_role` VALUES (2497, 1, 149);
INSERT INTO `sys_menu_role` VALUES (2498, 1, 10068);
INSERT INTO `sys_menu_role` VALUES (2499, 1, 150);
INSERT INTO `sys_menu_role` VALUES (2552, 32, 1);
INSERT INTO `sys_menu_role` VALUES (2553, 32, 2);
INSERT INTO `sys_menu_role` VALUES (2554, 32, 23);
INSERT INTO `sys_menu_role` VALUES (2555, 32, 4);
INSERT INTO `sys_menu_role` VALUES (2556, 32, 5);
INSERT INTO `sys_menu_role` VALUES (2557, 32, 7);
INSERT INTO `sys_menu_role` VALUES (2558, 32, 10072);
INSERT INTO `sys_menu_role` VALUES (2559, 32, 10073);
INSERT INTO `sys_menu_role` VALUES (2560, 32, 149);
INSERT INTO `sys_menu_role` VALUES (2561, 32, 150);
INSERT INTO `sys_menu_role` VALUES (2562, 32, 10068);
INSERT INTO `sys_menu_role` VALUES (2563, 32, 21);
INSERT INTO `sys_menu_role` VALUES (2564, 32, 14);
INSERT INTO `sys_menu_role` VALUES (2565, 32, 10009);
INSERT INTO `sys_menu_role` VALUES (2566, 32, 10085);
INSERT INTO `sys_menu_role` VALUES (2567, 32, 10086);
INSERT INTO `sys_menu_role` VALUES (2568, 32, 10087);
INSERT INTO `sys_menu_role` VALUES (2569, 32, 10102);
INSERT INTO `sys_menu_role` VALUES (2570, 32, 19);
INSERT INTO `sys_menu_role` VALUES (2571, 3, 1);
INSERT INTO `sys_menu_role` VALUES (2572, 3, 2);
INSERT INTO `sys_menu_role` VALUES (2573, 3, 23);
INSERT INTO `sys_menu_role` VALUES (2574, 3, 4);
INSERT INTO `sys_menu_role` VALUES (2575, 3, 5);
INSERT INTO `sys_menu_role` VALUES (2576, 3, 7);
INSERT INTO `sys_menu_role` VALUES (2577, 3, 21);
INSERT INTO `sys_menu_role` VALUES (2578, 3, 10009);
COMMIT;

-- ----------------------------
-- Table structure for sys_mq_msg
-- ----------------------------
DROP TABLE IF EXISTS `sys_mq_msg`;
CREATE TABLE `sys_mq_msg` (
  `id` bigint(255) NOT NULL AUTO_INCREMENT COMMENT '消息主键',
  `blog_title` varchar(255) DEFAULT NULL COMMENT '消息的博客标题',
  `blog_id` bigint(255) DEFAULT NULL COMMENT '消息的博客id',
  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_mq_msg
-- ----------------------------
BEGIN;
INSERT INTO `sys_mq_msg` VALUES (2, '一文知晓跨域，解决跨域', 5, '2022-04-03 14:43:59');
INSERT INTO `sys_mq_msg` VALUES (6, 'MySQL系列01-揭开面纱，显露架构', 11, '2022-04-07 10:42:45');
INSERT INTO `sys_mq_msg` VALUES (8, 'Feign远程调用请求头丢失', 21, '2022-04-19 09:23:31');
INSERT INTO `sys_mq_msg` VALUES (9, 'Vue实例的生命周期', 22, '2022-04-19 09:44:37');
INSERT INTO `sys_mq_msg` VALUES (12, 'OutputStream转InputStream', 25, '2022-04-21 17:25:27');
INSERT INTO `sys_mq_msg` VALUES (14, 'MySQL系列02-浅谈 MySQL InnoDB 的内存组件', 27, '2022-04-21 17:44:32');
INSERT INTO `sys_mq_msg` VALUES (16, 'Mysql的事务隔离级别', 29, '2022-04-29 11:33:04');
COMMIT;

-- ----------------------------
-- Table structure for sys_oauth_client
-- ----------------------------
DROP TABLE IF EXISTS `sys_oauth_client`;
CREATE TABLE `sys_oauth_client` (
  `client_id` varchar(256) NOT NULL,
  `resource_ids` varchar(256) DEFAULT NULL,
  `client_secret` varchar(256) DEFAULT NULL,
  `scope` varchar(256) DEFAULT NULL,
  `authorized_grant_types` varchar(256) DEFAULT NULL,
  `web_server_redirect_uri` varchar(256) DEFAULT NULL,
  `authorities` varchar(256) DEFAULT NULL,
  `access_token_validity` int(11) DEFAULT NULL,
  `refresh_token_validity` int(11) DEFAULT NULL,
  `additional_information` varchar(4096) DEFAULT NULL,
  `autoapprove` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`client_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sys_oauth_client
-- ----------------------------
BEGIN;
INSERT INTO `sys_oauth_client` VALUES ('client', '', '123456', 'all', 'password,refresh_token', NULL, NULL, 36000, 72000, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('knife4j_client', NULL, '123456', 'all', 'password,refresh_token', NULL, NULL, 36000, 72000, NULL, 'true');
INSERT INTO `sys_oauth_client` VALUES ('web-client', NULL, '654321', 'all', 'password,refresh_token', NULL, NULL, 36000, 72000, NULL, 'true');
COMMIT;

-- ----------------------------
-- Table structure for sys_operation_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_operation_log`;
CREATE TABLE `sys_operation_log` (
  `id` bigint(255) NOT NULL AUTO_INCREMENT,
  `micro_service` varchar(20) DEFAULT NULL COMMENT '字典微服务ID',
  `user_id` bigint(255) DEFAULT NULL COMMENT '用户ID',
  `interface_depict` varchar(50) DEFAULT NULL COMMENT '接口描述',
  `business_type` int(10) DEFAULT NULL COMMENT '业务类型（0其他 1新增 2修改 3删除',
  `method_class` varchar(100) DEFAULT NULL COMMENT '接口类',
  `request_method` varchar(10) DEFAULT NULL COMMENT '请求方式',
  `request_url` varchar(100) DEFAULT NULL COMMENT '请求的url',
  `operator_ip` varchar(50) DEFAULT NULL COMMENT '操作时的ip',
  `operator_location` varchar(255) DEFAULT NULL COMMENT '操作地点',
  `operation_param` varchar(2000) DEFAULT NULL COMMENT '请求参数',
  `json_result` varchar(2000) DEFAULT NULL COMMENT '返回参数',
  `operation_time` datetime DEFAULT NULL COMMENT '操作时间',
  `status` char(1) DEFAULT NULL COMMENT '操作状态（0成功 1失败）',
  `error_msg` varchar(2000) DEFAULT NULL COMMENT '错误消息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=410 DEFAULT CHARSET=utf8mb4;


-- ----------------------------
-- Table structure for sys_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `description` varchar(50) DEFAULT NULL COMMENT '权限名称',
  `url_perm` varchar(255) DEFAULT NULL COMMENT '请求路径权限标识',
  `btn_perm` varchar(255) DEFAULT NULL COMMENT '按钮权限标识',
  `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单名称',
  `parent_id` bigint(20) DEFAULT NULL COMMENT '父Id',
  `order_num` int(20) DEFAULT '0' COMMENT '排序号',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modified_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_permission
-- ----------------------------
BEGIN;
INSERT INTO `sys_permission` VALUES (11, '增加用户', 'POST:/uum-admin/api/v1/users/add', 'sys:user:add', 14, NULL, 0, '2022-01-24 15:47:17', '2022-01-25 18:55:05');
INSERT INTO `sys_permission` VALUES (13, '查询用户', 'GET:/uum-admin/api/v1/users/page/**', 'sys:user:select', 14, NULL, 0, '2022-01-25 13:51:09', '2022-01-25 21:01:35');
INSERT INTO `sys_permission` VALUES (14, '修改用户', 'PUT:/uum-admin/api/v1/users/update', 'sys:user:update', 14, NULL, 0, '2022-01-25 13:51:49', '2022-01-25 18:55:42');
INSERT INTO `sys_permission` VALUES (16, '删除用户', 'DELETE:/uum-admin/api/v1/users/delete/**', 'sys:user:delete', 14, NULL, 0, '2022-01-25 18:56:21', '2022-01-25 21:01:39');
INSERT INTO `sys_permission` VALUES (20, '查询字典', 'GET:/uum-admin/api/v1/dict/page/*', 'sys:dict:select', 10085, NULL, 0, '2022-01-25 20:23:51', '2022-01-25 20:33:07');
INSERT INTO `sys_permission` VALUES (21, '删除字典', 'DELETE:/uum-admin/api/v1/dict/delete/*', 'sys:dict:delete', 10085, NULL, 1, '2022-01-25 20:23:51', NULL);
INSERT INTO `sys_permission` VALUES (22, '修改字典', 'PUT:/uum-admin/api/v1/dict/update', 'sys:dict:update', 10085, NULL, 2, '2022-01-25 20:23:51', NULL);
INSERT INTO `sys_permission` VALUES (23, '新增字典', 'POST:/uum-admin/api/v1/dict/add', 'sys:dict:add', 10085, NULL, 3, '2022-01-25 20:23:51', NULL);
INSERT INTO `sys_permission` VALUES (24, '查询角色', 'GET:/uum-admin/api/v1/role/page/*', 'sys:role:select', 10009, NULL, 0, '2022-01-25 20:30:57', '2022-01-25 20:32:31');
INSERT INTO `sys_permission` VALUES (25, '删除角色', 'DELETE:/uum-admin/api/v1/role/delete/*', 'sys:role:delete', 10009, NULL, 1, '2022-01-25 20:30:57', NULL);
INSERT INTO `sys_permission` VALUES (26, '修改角色', 'PUT:/uum-admin/api/v1/role/update', 'sys:role:update', 10009, NULL, 2, '2022-01-25 20:30:57', NULL);
INSERT INTO `sys_permission` VALUES (27, '新增角色', 'POST:/uum-admin/api/v1/role/add', 'sys:role:add', 10009, NULL, 3, '2022-01-25 20:30:57', NULL);
INSERT INTO `sys_permission` VALUES (28, '查询字典项', 'GET:/uum-admin/api/v1/dict-items/page/*', 'sys:dict-items:select', 10085, NULL, 4, '2022-01-25 20:35:17', NULL);
INSERT INTO `sys_permission` VALUES (29, '删除字典项', 'DELETE:/uum-admin/api/v1/dict-items/delete/*', 'sys:dict-items:delete', 10085, NULL, 5, '2022-01-25 20:35:17', NULL);
INSERT INTO `sys_permission` VALUES (30, '修改字典项', 'PUT:/uum-admin/api/v1/dict-items/update', 'sys:dict-items:update', 10085, NULL, 5, '2022-01-25 20:35:17', '2022-01-25 20:43:00');
INSERT INTO `sys_permission` VALUES (31, '新增字典项', 'POST:/uum-admin/api/v1/dict-items/add', 'sys:dict-items:add', 10085, NULL, 7, '2022-01-25 20:35:17', NULL);
INSERT INTO `sys_permission` VALUES (32, '查询客户端', 'GET:/uum-admin/api/v1/oauth-clients/page/**', 'sys:oauth-clients:select', 10086, NULL, 0, '2022-02-03 22:35:24', NULL);
INSERT INTO `sys_permission` VALUES (33, '删除客户端', 'DELETE:/uum-admin/api/v1/oauth-clients/delete/**', 'sys:oauth-clients:delete', 10086, NULL, 1, '2022-02-03 22:35:24', NULL);
INSERT INTO `sys_permission` VALUES (34, '修改客户端', 'PUT:/uum-admin/api/v1/oauth-clients/update', 'sys:oauth-clients:update', 10086, NULL, 2, '2022-02-03 22:35:24', NULL);
INSERT INTO `sys_permission` VALUES (35, '新增客户端', 'POST:/uum-admin/api/v1/oauth-clients/add', 'sys:oauth-clients:add', 10086, NULL, 3, '2022-02-03 22:35:24', NULL);
INSERT INTO `sys_permission` VALUES (36, '查询菜单', 'GET:/uum-admin/api/v1/menu/page/**', 'sys:menu:select', 10087, NULL, 0, '2022-02-03 23:10:49', NULL);
INSERT INTO `sys_permission` VALUES (37, '删除菜单', 'DELETE:/uum-admin/api/v1/menu/delete/**', 'sys:menu:delete', 10087, NULL, 1, '2022-02-03 23:10:49', NULL);
INSERT INTO `sys_permission` VALUES (38, '修改菜单', 'PUT:/uum-admin/api/v1/menu/update', 'sys:menu:update', 10087, NULL, 2, '2022-02-03 23:10:49', NULL);
INSERT INTO `sys_permission` VALUES (39, '新增菜单', 'POST:/uum-admin/api/v1/menu/add', 'sys:menu:add', 10087, NULL, 3, '2022-02-03 23:10:49', NULL);
INSERT INTO `sys_permission` VALUES (40, '查询权限', 'GET:/uum-admin/api/v1/permission/page/**', 'sys:permission:select', 10087, NULL, 5, '2022-02-03 23:11:15', '2022-02-03 23:11:35');
INSERT INTO `sys_permission` VALUES (41, '删除权限', 'DELETE:/uum-admin/api/v1/permission/delete/**', 'sys:permission:delete', 10087, NULL, 6, '2022-02-03 23:11:15', '2022-02-03 23:11:43');
INSERT INTO `sys_permission` VALUES (42, '修改权限', 'PUT:/uum-admin/api/v1/permission/update', 'sys:permission:update', 10087, NULL, 7, '2022-02-03 23:11:15', '2022-02-03 23:11:49');
INSERT INTO `sys_permission` VALUES (43, '新增权限', 'POST:/uum-admin/api/v1/permission/add', 'sys:permission:add', 10087, NULL, 8, '2022-02-03 23:11:15', '2022-02-03 23:11:54');
INSERT INTO `sys_permission` VALUES (44, '查询分类', 'GET:/uum-blog/api/v1/category/page/**', 'sys:category:select', 5, NULL, 0, '2022-02-03 23:12:31', NULL);
INSERT INTO `sys_permission` VALUES (45, '删除分类', 'DELETE:/uum-blog/api/v1/category/delete/**', 'sys:category:delete', 5, NULL, 1, '2022-02-03 23:12:31', NULL);
INSERT INTO `sys_permission` VALUES (46, '修改分类', 'PUT:/uum-blog/api/v1/category/update', 'sys:category:update', 5, NULL, 2, '2022-02-03 23:12:31', NULL);
INSERT INTO `sys_permission` VALUES (47, '新增分类', 'POST:/uum-blog/api/v1/category/add', 'sys:category:add', 5, NULL, 3, '2022-02-03 23:12:32', NULL);
INSERT INTO `sys_permission` VALUES (48, '查询标签', 'GET:/uum-blog/api/v1/tag/page/**', 'sys:tag:select', 7, NULL, 0, '2022-02-03 23:12:55', NULL);
INSERT INTO `sys_permission` VALUES (49, '删除标签', 'DELETE:/uum-blog/api/v1/tag/delete/**', 'sys:tag:delete', 7, NULL, 1, '2022-02-03 23:12:55', NULL);
INSERT INTO `sys_permission` VALUES (50, '修改标签', 'PUT:/uum-blog/api/v1/tag/update', 'sys:tag:update', 7, NULL, 2, '2022-02-03 23:12:55', NULL);
INSERT INTO `sys_permission` VALUES (51, '新增标签', 'POST:/uum-blog/api/v1/tag/add', 'sys:tag:add', 7, NULL, 3, '2022-02-03 23:12:55', NULL);
INSERT INTO `sys_permission` VALUES (52, '查询博文', 'GET:/uum-blog/api/v1/blog/page/**', 'sys:blog:select', 2, NULL, 0, '2022-02-03 23:13:26', NULL);
INSERT INTO `sys_permission` VALUES (53, '删除博文', 'DELETE:/uum-blog/api/v1/blog/delete/**', 'sys:blog:delete', 2, NULL, 1, '2022-02-03 23:13:26', NULL);
INSERT INTO `sys_permission` VALUES (56, '修改博文', 'PUT:/uum-blog/api/v1/blog/update', 'sys:blog:update', 23, NULL, 0, '2022-02-03 23:14:32', NULL);
INSERT INTO `sys_permission` VALUES (57, '新增博文', 'POST:/uum-blog/api/v1/blog/add', 'sys:blog:add', 23, NULL, 1, '2022-02-03 23:14:58', NULL);
INSERT INTO `sys_permission` VALUES (58, '查询登陆日志', 'GET:/uum-admin/api/v1/login-log/page/**', 'sys:login-log:select', 150, NULL, 0, '2022-02-03 23:16:08', NULL);
INSERT INTO `sys_permission` VALUES (59, '删除登陆日志', 'DELETE:/uum-admin/api/v1/login-log/delete/**', 'sys:login-log:delete', 150, NULL, 1, '2022-02-03 23:16:08', NULL);
INSERT INTO `sys_permission` VALUES (62, '导出博文', '', 'sys:blog:export', 2, NULL, 3, '2022-02-03 23:20:36', '2022-03-13 18:12:21');
INSERT INTO `sys_permission` VALUES (63, '上传博文', 'POST:/uum-blog/api/v1/blog/uploadMarkdownFile', 'sys:blog:upload', 23, NULL, 4, '2022-02-03 23:23:08', NULL);
INSERT INTO `sys_permission` VALUES (64, '提交菜单', '', 'sys:role-menu:add', 10009, NULL, 5, '2022-02-04 12:44:53', '2022-02-04 13:06:30');
INSERT INTO `sys_permission` VALUES (65, '提交权限', '', 'sys:role-permission:add', 10009, NULL, 6, '2022-02-04 12:45:14', '2022-02-04 13:06:17');
INSERT INTO `sys_permission` VALUES (67, '上传图片', 'POST:/uum-oss/api/v1/oss/upload', 'sys:oss:upload', 19, NULL, 0, '2022-02-05 12:01:11', NULL);
INSERT INTO `sys_permission` VALUES (68, '删除图片', 'DELETE:/uum-oss/api/v1/oss/delete', 'sys:oss:delete', 19, NULL, 1, '2022-02-05 12:02:04', NULL);
INSERT INTO `sys_permission` VALUES (70, '查询消息', 'GET:/uum-mq/api/v1/mq/page/**', 'sys:mq:select', 10073, NULL, 0, '2022-03-07 17:27:08', NULL);
INSERT INTO `sys_permission` VALUES (71, '删除消息', 'DELETE:/uum-mq/api/v1/mq/delete/**', 'sys:mq:delete', 10073, NULL, 0, '2022-03-07 17:27:08', NULL);
INSERT INTO `sys_permission` VALUES (73, '查询操作日志', 'GET:/uum-admin/api/v1/operation/page/**', 'sys:operation:select', 10068, NULL, 0, '2022-03-07 17:30:56', NULL);
INSERT INTO `sys_permission` VALUES (74, '删除操作日志', 'DELETE:/uum-admin/api/v1/operation/delete/**', 'sys:operation:delete', 10068, NULL, 0, '2022-03-07 17:30:56', NULL);
INSERT INTO `sys_permission` VALUES (78, '设置博文', 'PUT:/uum-blog/api/v1/blog/setting', 'sys:blog:setting', 2, NULL, 2, '2022-03-13 17:53:32', '2022-03-13 18:15:25');
COMMIT;

-- ----------------------------
-- Table structure for sys_permission_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_permission_role`;
CREATE TABLE `sys_permission_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `permission_id` bigint(20) DEFAULT NULL,
  `role_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=243 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_permission_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_permission_role` VALUES (46, 15, 3);
INSERT INTO `sys_permission_role` VALUES (81, 11, 1);
INSERT INTO `sys_permission_role` VALUES (82, 13, 1);
INSERT INTO `sys_permission_role` VALUES (83, 14, 1);
INSERT INTO `sys_permission_role` VALUES (84, 16, 1);
INSERT INTO `sys_permission_role` VALUES (85, 24, 1);
INSERT INTO `sys_permission_role` VALUES (86, 25, 1);
INSERT INTO `sys_permission_role` VALUES (87, 26, 1);
INSERT INTO `sys_permission_role` VALUES (88, 27, 1);
INSERT INTO `sys_permission_role` VALUES (89, 20, 1);
INSERT INTO `sys_permission_role` VALUES (90, 21, 1);
INSERT INTO `sys_permission_role` VALUES (91, 22, 1);
INSERT INTO `sys_permission_role` VALUES (92, 23, 1);
INSERT INTO `sys_permission_role` VALUES (93, 28, 1);
INSERT INTO `sys_permission_role` VALUES (94, 29, 1);
INSERT INTO `sys_permission_role` VALUES (95, 30, 1);
INSERT INTO `sys_permission_role` VALUES (96, 31, 1);
INSERT INTO `sys_permission_role` VALUES (182, 70, 32);
INSERT INTO `sys_permission_role` VALUES (183, 58, 32);
INSERT INTO `sys_permission_role` VALUES (184, 73, 32);
INSERT INTO `sys_permission_role` VALUES (185, 11, 32);
INSERT INTO `sys_permission_role` VALUES (186, 13, 32);
INSERT INTO `sys_permission_role` VALUES (187, 14, 32);
INSERT INTO `sys_permission_role` VALUES (188, 16, 32);
INSERT INTO `sys_permission_role` VALUES (189, 24, 32);
INSERT INTO `sys_permission_role` VALUES (190, 25, 32);
INSERT INTO `sys_permission_role` VALUES (191, 26, 32);
INSERT INTO `sys_permission_role` VALUES (192, 27, 32);
INSERT INTO `sys_permission_role` VALUES (193, 64, 32);
INSERT INTO `sys_permission_role` VALUES (194, 65, 32);
INSERT INTO `sys_permission_role` VALUES (195, 20, 32);
INSERT INTO `sys_permission_role` VALUES (196, 23, 32);
INSERT INTO `sys_permission_role` VALUES (197, 28, 32);
INSERT INTO `sys_permission_role` VALUES (198, 31, 32);
INSERT INTO `sys_permission_role` VALUES (199, 32, 32);
INSERT INTO `sys_permission_role` VALUES (200, 36, 32);
INSERT INTO `sys_permission_role` VALUES (201, 37, 32);
INSERT INTO `sys_permission_role` VALUES (202, 38, 32);
INSERT INTO `sys_permission_role` VALUES (203, 39, 32);
INSERT INTO `sys_permission_role` VALUES (204, 40, 32);
INSERT INTO `sys_permission_role` VALUES (205, 41, 32);
INSERT INTO `sys_permission_role` VALUES (206, 42, 32);
INSERT INTO `sys_permission_role` VALUES (207, 43, 32);
INSERT INTO `sys_permission_role` VALUES (210, 24, 3);
INSERT INTO `sys_permission_role` VALUES (211, 52, 3);
INSERT INTO `sys_permission_role` VALUES (212, 53, 3);
INSERT INTO `sys_permission_role` VALUES (213, 62, 3);
INSERT INTO `sys_permission_role` VALUES (214, 78, 3);
INSERT INTO `sys_permission_role` VALUES (215, 56, 3);
INSERT INTO `sys_permission_role` VALUES (216, 57, 3);
INSERT INTO `sys_permission_role` VALUES (217, 63, 3);
INSERT INTO `sys_permission_role` VALUES (218, 44, 3);
INSERT INTO `sys_permission_role` VALUES (219, 45, 3);
INSERT INTO `sys_permission_role` VALUES (220, 46, 3);
INSERT INTO `sys_permission_role` VALUES (221, 47, 3);
INSERT INTO `sys_permission_role` VALUES (222, 48, 3);
INSERT INTO `sys_permission_role` VALUES (223, 49, 3);
INSERT INTO `sys_permission_role` VALUES (224, 50, 3);
INSERT INTO `sys_permission_role` VALUES (225, 51, 3);
INSERT INTO `sys_permission_role` VALUES (231, 48, 32);
INSERT INTO `sys_permission_role` VALUES (232, 51, 32);
INSERT INTO `sys_permission_role` VALUES (236, 44, 32);
INSERT INTO `sys_permission_role` VALUES (237, 47, 32);
INSERT INTO `sys_permission_role` VALUES (238, 52, 32);
INSERT INTO `sys_permission_role` VALUES (239, 62, 32);
INSERT INTO `sys_permission_role` VALUES (240, 78, 32);
INSERT INTO `sys_permission_role` VALUES (241, 57, 32);
INSERT INTO `sys_permission_role` VALUES (242, 63, 32);
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `role_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL COMMENT '角色名字',
  `code` varchar(20) DEFAULT NULL COMMENT '角色代码',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_user_id` bigint(255) DEFAULT NULL COMMENT '创建者id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modified_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'ADMIN', NULL, 1, '2021-03-04 13:07:16', NULL);
INSERT INTO `sys_role` VALUES (3, '普通用户', 'USER', '门户注册用户', 1, '2021-03-18 20:37:21', '2022-03-28 17:25:47');
INSERT INTO `sys_role` VALUES (32, '演示', 'DEMO', '用于演示', 1, '2022-03-28 10:43:16', NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` bigint(255) NOT NULL AUTO_INCREMENT,
  `username` varchar(20) DEFAULT NULL COMMENT '用户名',
  `nickname` varchar(20) DEFAULT NULL COMMENT '昵称',
  `password` varchar(255) DEFAULT NULL COMMENT '密码',
  `is_deleted` int(20) DEFAULT '0' COMMENT '逻辑删除 1已删除 0未删除',
  `is_disabled` int(20) DEFAULT '0' COMMENT '是否禁用 1已禁用 0未禁用',
  `status` int(20) DEFAULT '0' COMMENT '账号状态 0未激活 1已激活',
  `avatar` varchar(255) DEFAULT 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80' COMMENT '头像',
  `create_method` varchar(20) DEFAULT NULL COMMENT '创建方式',
  `create_user_id` bigint(255) DEFAULT NULL COMMENT '创建者ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `modified_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, 'admin', '超级管理员', '$2a$10$6u8RwTtGsnDVXxJF16HDWuNXZQKTfX8xptN0kPdjqpe525LxSoqzK', 0, 0, 1, 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', 'SYSTEM', 1, '2021-03-04 16:09:03', '2022-04-06 16:40:19');
INSERT INTO `sys_user` VALUES (2, 'uum2022', '演示账号', '$2a$10$HU6w/9GZj4V2M6Bf4jn1HunQXiLUu3X6aZYqtNfc6i6RbB535N83m', 0, 0, 1, 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif', 'SYSTEM', 1, '2022-03-28 23:08:59', NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_user_msg
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_msg`;
CREATE TABLE `sys_user_msg` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(255) DEFAULT NULL COMMENT '用户的id',
  `message_id` bigint(255) DEFAULT NULL COMMENT '已读消息的ID（博文的ID）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4;


-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `role_id` bigint(20) NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES (1, 1);
INSERT INTO `sys_user_role` VALUES (54, 3);
INSERT INTO `sys_user_role` VALUES (55, 3);
INSERT INTO `sys_user_role` VALUES (61, 3);
INSERT INTO `sys_user_role` VALUES (62, 3);
INSERT INTO `sys_user_role` VALUES (64, 32);
INSERT INTO `sys_user_role` VALUES (66, 3);
INSERT INTO `sys_user_role` VALUES (67, 3);
INSERT INTO `sys_user_role` VALUES (68, 3);
INSERT INTO `sys_user_role` VALUES (69, 3);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
